<?php
namespace app\index\validate;
use think\Validate;

class Order extends Validate
{
    protected $rule = [
        'id'            => 'require|gt:0',
        'pay_type'      => 'require|gt:0',
        'activity_id'   => 'require|gt:0',
    ];

    protected $message = [
        'id.require'            => '充值项Id不能为空',
        'id.gt'                 => '充值项Id不能为空',
        'pay_type.require'      => '支付渠道类型不能为空',
        'pay_type.gt'           => '支付渠道类型不能为空',
        'activity_id.require'   => '充值活动Id不能为空',
        'activity_id.gt'        => '充值活动Id不能为空',
    ];

    protected $scene = [
        'create'        => ['id','pay_type'],
        'create_ac'     => ['activity_id','pay_type'],
    ];
}